Due to performance reasons, toNetworkBytes and toBytes needs to be in api instead of back implementation. This allows to use non-allocating memory when sending data. Keep in mind that the data is converted to big endian before being sent.
Any data type wanted to send
See Implementation
Due to performance reasons, toNetworkBytes and toBytes needs to be in api instead of back implementation. This allows to use non-allocating memory when sending data. Keep in mind that the data is converted to big endian before being sent.